package Example6point1;

import java.awt.*;

public class AddFrame extends Frame {
    public AddFrame() throws HeadlessException {
        super("加法运算");
        this.setSize(400, 100);
        this.setLocation(300, 240);
        this.setLayout(new FlowLayout());
        this.add(new TextField("10", 8));
        this.add(new Label("+"));
        this.add(new TextField("20", 8));
        this.add(new Button("="));
        this.add(new TextField(10));
        this.setVisible(true);
        this.pack();
    }

    public static void main(String[] args) {
        new AddFrame();
    }
}
